
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags" %>
<!DOCTYPE html>
<html>
    <head>
        <sj:head/>
        <script src="js/jquery.js"></script>
        <script src="js/jquery.cookie.js"></script>
        <script src="js/coms.js"></script>

        <title><s:text name="com.logintitle"/></title>
    </head>
    <body>
        <s:include value="/jsp/header.jsp"/>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span3">
                    <s:action name="selectMenu" executeResult="true"/>
                </div>
                <div class="span9">
                    <div class="hero-unit">
                        <s:form action="submitReview" id="ratingForm">
                            <table class="table table-bordered" align="center">
                                <thead>
                                    <tr>
                                        <th><h3>Content Headings</h3></th>
                                        <th><h3>Rating</h3></th>
                                </tr>
                                </thead>
                                <s:iterator value="sectionList" id="section">
                                    <s:iterator value="#section.headings" id="heading">
                                        <tr>
                                            <td>
                                                <!-- Accessing the objects inside the phone number object through the number variable -->
                                                <s:property value="#heading.name" />

                                            </td>
                                            <td>
                                                <s:property value="#heading.rating"/> (<s:property value="#heading.rateValue"/>) 
                                                <s:hidden id="h-%{#heading.id}" name="%{#heading.id}" value=""/>                                       
                                            </td>
                                        </tr>
                                    </s:iterator>
                                </s:iterator>
                                <tr>
                                    <td><s:text name="fieldLabel.commentToAuthor"/></td>
                                    <td><s:textarea name="review.commentToAuthor"/></td>
                                </tr>
                                
                                <s:if test="%{admin}">
                                
                                <tr>
                                    <td><s:text name="fieldLabel.commentToAdmin"/></td>
                                    <td><s:textarea name="review.commentToAdministrator"/></td>
                                </tr>
                                </s:if>
                                
                            </table>
                            <div id="hidden_headings">

                            </div>
                        
                        </s:form>
                    </div>
                    <div class="row-fluid">
                    </div>
                </div>
            </div>
        </div>
        <s:include value="/jsp/footer.jsp"/>
    </body>
</html>
